package com.zmn.plat.common.dto.price;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 描述: 项目
 *
 * @author guoqiao
 * @since 2021/8/27 15:40
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Valid
public class ItemTo implements Serializable {

    private static final long serialVersionUID = -6096500674250591874L;

    /**** item表 ****/

    @ApiModelProperty("项目ID")
    private Integer itemId;

    @ApiModelProperty("项目名称")
    private String itemName;

    @ApiModelProperty("项目分组ID")
    private Integer groupId;

    @ApiModelProperty("价格表id")
    private Integer tariffId;

    @ApiModelProperty("项目分类Id")
    private Integer itemCategId;

    @ApiModelProperty("项目分类名称")
    private String itemCategName;

    @ApiModelProperty("单位：从Plat字典表中取")
    private String unit;

    @ApiModelProperty("项目简介")
    private String brief;

    @ApiModelProperty("项目说明")
    private String itemDesc;

    @ApiModelProperty("一口价：1非一口价（可议价），2一口价")
    private Integer priceStandard;

    @ApiModelProperty("是否区分明细：1否，2是")
    private Integer priceSplit;

    @ApiModelProperty("明细类型：1明细一，2明细二")
    private Integer priceSplitType;

    @ApiModelProperty("交通费，固定金额，单位：分")
    private Integer trafficFee;

    @ApiModelProperty("工时费，固定金额，单位：分")
    private Integer hourFee;

    @ApiModelProperty("检测费，固定金额，单位：分")
    private Integer checkFee;

    @ApiModelProperty("配件包干费率")
    private BigDecimal partRatio;

    @ApiModelProperty("工艺费费率")
    private BigDecimal artRatio;

    @ApiModelProperty("保修费费率")
    private BigDecimal guaranteeRatio;

    @ApiModelProperty("材料费费率（明细二）")
    private BigDecimal materialFee;

    @ApiModelProperty("数量阶梯值（明细二）")
    private Integer numberStep;

    @ApiModelProperty("数量阶梯降幅（明细二）")
    private Integer numberStepDown;

    @ApiModelProperty("底折（明细二）")
    private Integer baseDiscount;

    @ApiModelProperty("最大数量")
    private Integer countLimit;

    @ApiModelProperty("item排序")
    private Integer itemSort;

    @ApiModelProperty("服务时长，单位分钟")
    private Integer serviceMinutes;

    @ApiModelProperty("是否默认服务项：1否，2是")
    private Integer general;

    @ApiModelProperty("互斥性：1全局互斥，2局部互斥，3不互斥")
    private Integer mutexMode;

    @ApiModelProperty("是否受城市系数影响：1否，2是")
    private Integer cityLimit;

    @ApiModelProperty("是否受品牌系数影响：1否，2是")
    private Integer brandLimit;

    @ApiModelProperty("是否允许修改价格：1否2是")
    private Integer manualPrice;

    @ApiModelProperty("APP显示：1否2是")
    private Integer show;

    @ApiModelProperty("APP编辑：1否2是")
    private Integer editEnable;

    @ApiModelProperty("前端价格显示：1否2是")
    private Integer showPrice;

    @ApiModelProperty("是否要求工程师拍照：1否，2是")
    private Integer takePicture;

    /**** tariff_product_item表 ****/

    @ApiModelProperty("后台产品ID")
    private Integer productId;

    @ApiModelProperty("销售价：单位分")
    private Integer price;

    @ApiModelProperty("面议最高价格")
    private Integer negotiableMaxPrice;

    @ApiModelProperty("面议最低价格")
    private Integer negotiableMinPrice;

    @ApiModelProperty("内部结算价")
    private Integer internalSettlementPrice;

    @ApiModelProperty("外部结算价")
    private Integer externalSettlementPrice;

    @ApiModelProperty("排序：越小越靠前显示")
    private Integer productItemSort;

    /**** 计算出的价格明细字段 ****/

    @ApiModelProperty("配件包干费")
    private Integer partPrice;

    @ApiModelProperty("工艺费")
    private Integer artPrice;

    @ApiModelProperty("保修费")
    private Integer guaranteePrice;

    @ApiModelProperty("技术服务费")
    private Integer servicePrice;

    @ApiModelProperty("最低价(销售价-技术服务费)")
    private Integer minPrice;

    @ApiModelProperty("材料费（明细二）")
    private Integer materialPrice;

    @ApiModelProperty("工艺费（明细二）")
    private Integer artPriceDetailTwo;

    /**** product表冗余字段 ****/

    @ApiModelProperty("后台产品名称")
    private String productName;

    @ApiModelProperty("后台产品排序")
    private Integer productSort;

    @ApiModelProperty("后台产品服务分类名称")
    private String servCategName;

    @ApiModelProperty("后台产品一级分类名称")
    private String categOneName;

    @ApiModelProperty("后台产品二级分类id")
    private Integer categId;

    @ApiModelProperty("后台产品二级分类名称")
    private String categName;

    @ApiModelProperty("后台产品二级分类排序")
    private Integer categSort;

    /**** tariff表冗余字段 ****/

    @ApiModelProperty("价格表名称")
    private String tariffName;

    @ApiModelProperty("价格表类型，1服务定价 2计价器定价 3提前付定价")
    private Integer tariffType;

    @ApiModelProperty("定价方式：1系数定价 2城市定价")
    private Integer priceType;

    /**** tariff_product表冗余字段 ****/

    @ApiModelProperty("描述")
    private String desc;

    @ApiModelProperty("特殊说明")
    private String specialDesc;

    /**** tariff_group表冗余字段 ****/

    @ApiModelProperty("项目分组名称")
    private String groupName;

    @ApiModelProperty("项目分组排序")
    private Integer groupSort;

    /**** item_categ表冗余字段 ****/

    @ApiModelProperty("项目分类排序")
    private Integer itemCategSort;

}
